/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.ejb.clients;

import cassys.application.services.ClassGroupManagementBeanRemote;
import cassys.domain.classManagement.ClassGroup;
import java.util.List;

/**
 *
 * @author User
 */
public class ClassGroupManagementDelegate {

    private ClassGroupManagementBeanRemote classGroupManagementBean = null;

    public ClassGroupManagementDelegate() {
        try {
            classGroupManagementBean = ServiceLocator.getInstance().lookupClassGroupManagementBean();
        } catch (Exception e) {
            System.out.println(e.getStackTrace());
        }
    }

    public void createClassGroup(ClassGroup classGroup) {
        System.out.println(classGroup.toString());
        classGroupManagementBean.createClassGroup(classGroup);
    }

    public List<ClassGroup> getAllClassGroups() {
        return classGroupManagementBean.getAllClassGroups();
    }

    public ClassGroup findByClassGroupId(long classGroupId) {
        return classGroupManagementBean.findByClassGroupId(classGroupId);
    }

    public void updateClassGroup(ClassGroup classGroup) {
        classGroupManagementBean.updateClassGroup(classGroup);
    }

    public void deleteClassGroup(ClassGroup classGroup) {
        classGroupManagementBean.deleteClassGroup(classGroup);
    }
}
